Skip to content

Add new Custom Rector Rule to Pass true to 3rd parameter of in_array when no value provided#3799

Merged
samsonasik merged 4 commits intocodeigniter4:developfrom
samsonasik:add-rector-rule-to-pass-third-parameter-true-to-in-array
Oct 23, 2020
Merged

Add new Custom Rector Rule to Pass true to 3rd parameter of in_array when no value provided#3799
samsonasik merged 4 commits intocodeigniter4:developfrom
samsonasik:add-rector-rule-to-pass-third-parameter-true-to-in-array

Conversation

@samsonasik
Copy link
Copy Markdown
Member

Added new Custom Rector Rule to Pass true to 3rd parameter of in_array when no value provided.

Checklist:

  • Securely signed commits

@samsonasik
Copy link
Copy Markdown
Member Author

All green 🎉

Copy link
Copy Markdown
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stricter means less prone to errors. 🥳

Can we have also, maybe in a separate PR, other functions which have a $strict parameter also set to true, like in base64_decode and other functions?

@samsonasik
Copy link
Copy Markdown
Member Author

@paulbalandan Yes, next, I can create new rule for other functions, or refactor it to accept register new function with expected arg position to be true.

Comment thread utils/Rector/PassStrictParameterToFunctionParameterRector.php
@samsonasik
Copy link
Copy Markdown
Member Author

latest phpstan release seems cause an error https://github.com/phpstan/phpstan/releases/tag/0.12.51

@samsonasik
Copy link
Copy Markdown
Member Author

I currently ignore new unrelated phpstan error due new release of phpstan

@samsonasik
Copy link
Copy Markdown
Member Author

All green 🎉

@samsonasik samsonasik merged commit 3d0ecc4 into codeigniter4:develop Oct 23, 2020
@samsonasik samsonasik deleted the add-rector-rule-to-pass-third-parameter-true-to-in-array branch October 23, 2020 18:21
@samsonasik
Copy link
Copy Markdown
Member Author

@paulbalandan @michalsn Thank you for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants